package com.seqb.common.controller;

import com.seqb.common.utils.ShiroUtils;
import com.seqb.manage.user.domain.UserDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import javax.servlet.http.HttpServletRequest;

/**
 * @author lilinshen
 * @title 请填写标题
 * @description 请填写相关描述
 * @date 2019/11/15
 */
@Controller
public class BaseController {
    @Autowired
    private HttpServletRequest request;

    public UserDO getUser() {
        return ShiroUtils.getUser();
    }

    public Long getUserId() {
        return getUser().getId();
    }

    public String getUsername() {
        return getUser().getUsername();
    }

    public HttpServletRequest getRequest() {
        return this.request;
    }

}